package config;

import java.util.Properties;
import java.io.InputStream;
import org.apache.commons.lang.StringUtils;

public class Res {

	private static Properties PROP;

	private static InputStream FIS;

	private static String PRO_FILE = "Res.properties";
	static {
		try {
			PROP = new Properties();
			FIS = new Res().getClass().getResourceAsStream(PRO_FILE);
			PROP.load(FIS);
			FIS.close();

		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	public static String getParam(String key) {
		String param = PROP.getProperty(key);
		if(StringUtils.isNotEmpty(param))
		param = param.trim();
		return param;
	}

}
